home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-04-19 | 5.5 KB | 225 lines | [TEXT/MPS ] |
-
- /*
- * This file was generated by the SOM Compiler.
- * FileName: Locrian:WWDCSun:CPlusPlus:Translat.xh.
- * Generated using:
- * SOM Precompiler somipc: somc/smemit.c
- * SOM Emitter emitxh.dll: somc/smmain.c
- */
-
- /*
- *
- * Constants
- *
- */
-
-
- #ifndef SOM_ODTranslation_xh
- #define SOM_ODTranslation_xh
-
- class ODTranslation;
-
- #define ODTranslation_MajorVersion 0
- #define ODTranslation_MinorVersion 0
-
- /* C++ som defs */
- #include <somcls.xh>
-
- /* Include C++ parent defs */
- #ifndef SOM_ODObject_xh
- #include <ODObject.xh>
- #endif
-
- #ifndef ODTranslation_API
- #define ODTranslation_API
- /*
- * -- The Class API
- */
-
- /*
- * Start of user-defined types:
- */
- class ODExtension;
- class ODTypeSet;
- class ODStorageUnitView;
-
- /*
- * End of user-defined types.
- */
-
- #if applec ^ PRAGMA_LIB_EXPORT
- #pragma lib_export on
- #endif
-
-
- /* A procedure to create the ODTranslation Class */
- SOMEXTERN SOMClass * SOMLINK ODTranslationNewClass(
- integer4 majorVersion,
- integer4 minorVersion);
-
- /* The API to the ODTranslation class object, and the methods it introduces. */
- typedef struct ODTranslationClassDataStructure {
- SOMClass *classObject;
- somMToken InitTranslation;
- somMToken CanTranslate;
- somMToken GetTranslationOf;
- somMToken TranslateView;
- somMToken Translate;
- somMToken GetISOTypeFromPlatformType;
- somMToken GetPlatformTypeFromISOType;
- } ODTranslationClassDataStructure;
- #ifdef SOM_NO_DATA_EXPORTS
- SOMEXTERN ODTranslationClassDataStructure * ODTranslationGetClassData ( void );
- # undef ODTranslationClassData
- # define ODTranslationClassData (*ODTranslationGetClassData())
- #else
- SOMEXTERN ODTranslationClassDataStructure ODTranslationClassData;
- #endif /* SOM_NO_DATA_EXPORTS */
-
- #if applec ^ PRAGMA_LIB_EXPORT
- #pragma lib_export off
- #endif
-
- #define _ODTranslation ODTranslationClassData.classObject
-
- /* The API to parentMtabs for ODTranslation, and the instance data it introduces. */
- SOMEXTERN struct ODTranslationCClassDataStructure {
- somMethodTabs parentMtab;
- somDToken instanceDataToken;
- } ODTranslationCClassData;
-
- /*
- * -- Typedefs for Procedures that support Methods introduced by ODTranslation
- */
- SOMEXTERN {
- typedef void (* SOMLINK somTD_ODTranslation_InitTranslation)(ODTranslation *somSelf, Environment *ev);
- typedef ODTranslateResult (* SOMLINK somTD_ODTranslation_CanTranslate)(ODTranslation *somSelf, Environment *ev,
- ODType fromType);
- typedef ODTypeSet* (* SOMLINK somTD_ODTranslation_GetTranslationOf)(ODTranslation *somSelf, Environment *ev,
- ODType fromType);
- typedef ODTranslateResult (* SOMLINK somTD_ODTranslation_TranslateView)(ODTranslation *somSelf, Environment *ev,
- ODStorageUnitView* fromView,
- ODStorageUnitView* toView);
- typedef ODTranslateResult (* SOMLINK somTD_ODTranslation_Translate)(ODTranslation *somSelf, Environment *ev,
- ODPtr fromData,
- ODULong fromDataSize,
- ODType fromType,
- ODType toType,
- ODPtr* toData,
- ODULong* toDataSize);
- typedef ODType (* SOMLINK somTD_ODTranslation_GetISOTypeFromPlatformType)(ODTranslation *somSelf, Environment *ev,
- ODPlatformType platformType,
- ODPlatformTypeSpace typeSpace);
- typedef ODPlatformType (* SOMLINK somTD_ODTranslation_GetPlatformTypeFromISOType)(ODTranslation *somSelf, Environment *ev,
- ODType type);
- }
-
- #endif /* ODTranslation_API */
-
-
- /*
- * -- Method Tokens are Thunks
- */
- #undef somresolve_
- #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
-
- /*
- * -- The C++ Wrapper Class for ODTranslation
- */
- class ODTranslation : public ODObject
- {
- public:
-
- void *operator new(size_t size)
- {
- SOM_IgnoreWarning(size);
- if (!ODTranslationClassData.classObject)
- ODTranslationNewClass(ODTranslation_MajorVersion,ODTranslation_MinorVersion);
- return (void *)
- ((somTD_SOMClass_somNew)
- somresolve_((SOMObject *)((void*)(ODTranslationClassData.classObject)),
- SOMClassClassData.somNew))
- ((SOMClass *)((void*)(ODTranslationClassData.classObject)));
- }
-
- void operator delete(void * obj)
- {
- ((SOMObject *)obj)->somFree();
- }
-
- /* public method: InitTranslation */
- void InitTranslation(Environment *ev)
- {
- SOM_Resolve(this,ODTranslation,InitTranslation)
- (this,ev);
- }
-
-
- /* public method: CanTranslate */
- ODTranslateResult CanTranslate(Environment *ev,
- ODType fromType)
- {
- return SOM_Resolve(this,ODTranslation,CanTranslate)
- (this,ev,fromType);
- }
-
-
- /* public method: GetTranslationOf */
- ODTypeSet* GetTranslationOf(Environment *ev,
- ODType fromType)
- {
- return SOM_Resolve(this,ODTranslation,GetTranslationOf)
- (this,ev,fromType);
- }
-
-
- /* public method: TranslateView */
- ODTranslateResult TranslateView(Environment *ev,
- ODStorageUnitView* fromView,
- ODStorageUnitView* toView)
- {
- return SOM_Resolve(this,ODTranslation,TranslateView)
- (this,ev,fromView,toView);
- }
-
-
- /* public method: Translate */
- ODTranslateResult Translate(Environment *ev,
- ODPtr fromData,
- ODULong fromDataSize,
- ODType fromType,
- ODType toType,
- ODPtr* toData,
- ODULong* toDataSize)
- {
- return SOM_Resolve(this,ODTranslation,Translate)
- (this,ev,fromData,fromDataSize,fromType,toType,toData,toDataSize);
- }
-
-
- /* public method: GetISOTypeFromPlatformType */
- ODType GetISOTypeFromPlatformType(Environment *ev,
- ODPlatformType platformType,
- ODPlatformTypeSpace typeSpace)
- {
- return SOM_Resolve(this,ODTranslation,GetISOTypeFromPlatformType)
- (this,ev,platformType,typeSpace);
- }
-
-
- /* public method: GetPlatformTypeFromISOType */
- ODPlatformType GetPlatformTypeFromISOType(Environment *ev,
- ODType type)
- {
- return SOM_Resolve(this,ODTranslation,GetPlatformTypeFromISOType)
- (this,ev,type);
- }
-
-
-
- }; /* ODTranslation */
-
-
-
- #endif /* SOM_ODTranslation_xh */
-